package com.endoc.designpattern.observer.jdk;

import java.util.Observable;
import java.util.Observer;

/**
 * jdk提供的观察者
 */
public class Customer implements Observer {

    @Override
    public void update(Observable o, Object arg) {
        System.out.println(name+"收到到货通知了");
    }

    String name;

    public Customer(String name) {
        this.name = name;
    }
}
